package com.example.lenovo.appstore.activity;

import androidx.appcompat.app.AppCompatActivity;
import butterknife.Bind;
import butterknife.ButterKnife;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.example.lenovo.appstore.R;
import com.example.lenovo.appstore.base.BaseActivity;
import com.example.lenovo.appstore.utils.AppContext;
import com.example.lenovo.appstore.utils.AppManager;
import com.example.lenovo.appstore.utils.StatusBarUtil;
import com.example.lenovo.appstore.utils.ToastUtil;
import com.example.lenovo.appstore.view.TitleBarView;

public class BindingAccoutActivity extends BaseActivity implements View.OnClickListener {
    @Bind(R.id.binding_title)
    TitleBarView binding_title;

    @Bind(R.id.binding_new_phone)
    EditText binding_new_phone;//新手机号

    @Bind(R.id.binding_getcode)
    TextView binding_getcode;//获取验证码

    @Bind(R.id.binding_etcode)
    EditText binding_etcode;//验证码


    @Bind(R.id.binging_confirm)
    TextView binging_confrim;//确定



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_binding_accout);
        ButterKnife.bind(this);
        initView();
    }

    @Override
    protected void initView() {
        binding_title.setTitle(AppContext.getInstance().getResources().getString(R.string.binging_accout));
        binding_title.showBackButton(true);
        StatusBarUtil.setStatusBarLightMode(getWindow());
        initListener();
    }

    @Override
    protected void initListener() {
        binging_confrim.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.binging_confirm:
                ToastUtil.makeText(BindingAccoutActivity.this,AppContext.getInstance().getResources().getString(R.string.changeaccout_success));
                Intent intent = new Intent(BindingAccoutActivity.this,LoginActivity.class);
                startActivity(intent);
                AppManager.getInstance().killAllActivity();
                break;
        }
    }
}
